package com.ruoyi.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.mapper.ParkingOrderRefundMapper;
import com.ruoyi.domain.ParkingOrderRefund;
import com.ruoyi.service.IParkingOrderRefundService;

/**
 * 停车订单退款Service业务层处理
 * 
 * @author dongdong
 * @date 2025-11-20
 */
@Service
public class ParkingOrderRefundServiceImpl implements IParkingOrderRefundService 
{
    @Autowired
    private ParkingOrderRefundMapper parkingOrderRefundMapper;

    /**
     * 查询停车订单退款
     * 
     * @param id 停车订单退款主键
     * @return 停车订单退款
     */
    @Override
    public ParkingOrderRefund selectParkingOrderRefundById(Long id)
    {
        return parkingOrderRefundMapper.selectParkingOrderRefundById(id);
    }

    /**
     * 查询停车订单退款列表
     * 
     * @param parkingOrderRefund 停车订单退款
     * @return 停车订单退款
     */
    @Override
    public List<ParkingOrderRefund> selectParkingOrderRefundList(ParkingOrderRefund parkingOrderRefund)
    {
        return parkingOrderRefundMapper.selectParkingOrderRefundList(parkingOrderRefund);
    }

    /**
     * 新增停车订单退款
     * 
     * @param parkingOrderRefund 停车订单退款
     * @return 结果
     */
    @Override
    public int insertParkingOrderRefund(ParkingOrderRefund parkingOrderRefund)
    {
        parkingOrderRefund.setCreateTime(DateUtils.getNowDate());
        return parkingOrderRefundMapper.insertParkingOrderRefund(parkingOrderRefund);
    }

    /**
     * 修改停车订单退款
     * 
     * @param parkingOrderRefund 停车订单退款
     * @return 结果
     */
    @Override
    public int updateParkingOrderRefund(ParkingOrderRefund parkingOrderRefund)
    {
        parkingOrderRefund.setUpdateTime(DateUtils.getNowDate());
        return parkingOrderRefundMapper.updateParkingOrderRefund(parkingOrderRefund);
    }

    /**
     * 批量删除停车订单退款
     * 
     * @param ids 需要删除的停车订单退款主键
     * @return 结果
     */
    @Override
    public int deleteParkingOrderRefundByIds(Long[] ids)
    {
        return parkingOrderRefundMapper.deleteParkingOrderRefundByIds(ids);
    }

    /**
     * 删除停车订单退款信息
     * 
     * @param id 停车订单退款主键
     * @return 结果
     */
    @Override
    public int deleteParkingOrderRefundById(Long id)
    {
        return parkingOrderRefundMapper.deleteParkingOrderRefundById(id);
    }
}
